<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="order by dede58.com"/>
<link href="/static/css/common.css" rel="stylesheet" type="text/css" />
<link href="/static/css/style.css" rel="stylesheet" type="text/css" />
<link href="/static/css/user_style.css" rel="stylesheet" type="text/css" />
<link href="/static/skins/all.css" rel="stylesheet" type="text/css" />
<script src="/static/js/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="/static/js/jquery.SuperSlide.2.1.1.js" type="text/javascript"></script>
<script src="/static/js/common_js.js" type="text/javascript"></script>
<script src="/static/js/footer.js" type="text/javascript"></script>
<script src="/static/layer/layer.js" type="text/javascript"></script>
<script src="/static/js/iCheck.js" type="text/javascript"></script>
<script src="/static/js/custom.js" type="text/javascript"></script>
<title>用户中心-收货地址</title>
</head>

<body>
<head>
 <div id="header_top">
  <div id="top">
    <div class="Inside_pages">
        {% if user.is_authenticated %}
     <div class="login_btn fl">
        欢迎您：<em>{{ user.username }}</em>
        <span>|</span>
        <a href="/logout">退出</a>
    </div>
        {% else %}
      <div class="Collection">
          <a href="/login" class="green">请登录</a><span>|</span> <a href="/register" class="green">免费注册</a></div>
         {% endif %}
	<div class="hd_top_manu clearfix">
	  <ul class="clearfix">
	   <li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="{{ url("index:index") }}">首页</a></li>
	   <li class="hd_menu_tit" data-addclass="hd_menu_hover"> <a href="/usercenter/">我的小充</a> </li>
{#	   <li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="#">消息中心</a></li>#}
{#       <li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="#">商品分类</a></li>#}
        <li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="/carts/">我的购物车<b>({{ count }})</b></a></li>
	  </ul>
	</div>
    </div>
  </div>
  <div id="header"  class="header page_style">
  <div class="logo"><a href="{{ url("index:index") }}"><img src="/static/images/logo.png" /></a></div>
  <!--结束图层-->
  <div class="Search">
        <div class="search_list">
            <ul>
                <li class="current"><a href="#">产品</a></li>
                <li><a href="#">信息</a></li>
            </ul>
        </div>
        <div class="clear search_cur">
           <input name="searchName" id="searchName" class="search_box" onkeydown="keyDownSearch()" type="text">
           <input name="" type="submit" value="搜 索"  class="Search_btn"/>
        </div>
        <div class="clear hotword">热门搜索词：香醋&nbsp;&nbsp;&nbsp;茶叶&nbsp;&nbsp;&nbsp;草莓&nbsp;&nbsp;&nbsp;葡萄&nbsp;&nbsp;&nbsp;菜油</div>
</div>
 <!--购物车样式-->
  <div class="hd_Shopping_list " id="Shopping_list">
   <div class="s_cart"><a href="/carts/">我的购物车</a> <i class="ci-right">&gt;</i><i class="ci-count" id="shopping-amount">{{ count }}</i></div>
   <div class="dorpdown-layer">
    <div class="spacer"></div>
	 <!--<div class="prompt"></div><div class="nogoods"><b></b>购物车中还没有商品，赶紧选购吧！</div>-->
	 <ul class="p_s_list">
		<li>
            {% for cart in cart_skus %}
		    <div class="img"><img src="{{ cart.default_image_url }}"></div>
		    <div class="content"><p class="name"><a href="#">产品名称</a></p><p>{{ cart.name }}</p></div>
			<div class="Operations">
			<p class="Price">￥{{ cart.price }}</p>
			<p><a href="#">数量：{{ cart.count }}</a></p>
                {% endfor %}
            </div>
		  </li>
		</ul>
	 <div class="Shopping_style">
	 <div class="p-total">共<b>{{ count }}</b>件商品　共计<strong>￥ {{ price_mall }}</strong></div>
	  <a href="/carts/" title="去购物车结算" id="btn-payforgoods" class="Shopping">去购物车结算</a>
	 </div>
   </div>
 </div>
</div>
<!--菜单栏-->
	<div class="Navigation" id="Navigation">
		 <ul class="Navigation_name">
			<li><a href="Home.html">首页</a></li>
			<li><a href="#">你身边的超市</a></li>
			<li><a href="#">预售专区</a><em class="hot_icon"></em></li>
			<li><a href="products_list.html">商城</a></li>
			<li><a href="#">半小时生活圈</a></li>
			<li><a href="#">好评商户</a></li>
			<li><a href="#">热销活动</a></li>
			<li><a href="Brands.html">联系我们</a></li>
		 </ul>			 
		</div>
	<script>$("#Navigation").slide({titCell:".Navigation_name li",trigger:"click"});</script>
    </div>
</head>
<!--用户中心样式-->
<div class="user_style clearfix">
 <div class="user_center clearfix">
   <div class="left_style">
     <div class="menu_style">
     <div class="user_title">用户中心</div>
     <div class="user_Head">
     <div class="user_portrait">
      <a href="/test" title="修改头像" class="btn_link"></a> <img src="{{ image }}">
      <div class="background_img"></div>
      </div>
      <div class="user_name">
       <p><span class="name">{{ user.username }}</span><a href="/password">[修改密码]</a></p>
       <p>访问时间：{{ last_login }}</p>
       </div>
     </div>
     <div class="sideMen">
     <!--菜单列表图层-->
         <dl class="accountSideOption1">
      <dt class="transaction_manage"><em class="icon_1"></em>用户管理</dt>
      <dd>
        <ul>
          <li> <a href="/usercenter">用户信息</a></li>
        </ul>
      </dd>
    </dl>
     <dl class="accountSideOption1">
      <dt class="transaction_manage"><em class="icon_1"></em>订单管理</dt>
      <dd>
        <ul>
          <li> <a href="{{ url('users:my_orders', kwargs={"page_num": 1}) }}">我的订单</a></li>
          <li> <a href="/address">收货地址</a></li>
        </ul>
      </dd>
    </dl>
{#     <dl class="accountSideOption1">#}
{#      <dt class="transaction_manage"><em class="icon_2"></em>会员管理</dt>#}
{#        <dd>#}
{#      <ul>#}
{#        <li> <a href="#"> 用户信息</a></li>#}
{#        <li> <a href="用户中心-我的收藏.html"> 我的收藏</a></li>#}
{#        <li> <a href="#"> 我的留言</a></li>#}
{#        <li> <a href="#">我的标签</a></li>#}
{#        <li> <a href="#"> 我的推荐</a></li>#}
{#        <li><a href="#"> 我的评论</a></li>#}
{#      </ul>#}
{#    </dd>#}
{#    </dl>#}
{#     <dl class="accountSideOption1">#}
{#      <dt class="transaction_manage"><em class="icon_3"></em>账户管理</dt>#}
{#      <dd>#}
{#       <ul>#}
{#        <li><a href="用户中心-账户管理.html">账户余额</a></li>#}
{#       <li><a href="用户中心-消费记录.html">消费记录</a></li>     #}
{#       <li><a href="#">资金管理</a></li>#}
{#      </ul>#}
{#     </dd>#}
{#    </dl>#}
{#     <dl class="accountSideOption1">#}
{#      <dt class="transaction_manage"><em class="icon_4"></em>分销管理</dt>#}
{#      <dd>#}
{#        <ul>#}
{#          <li> <a href="#">店铺管理</a></li>#}
{#          <li> <a href="#">我的盟友</a></li>#}
{#          <li> <a href="#">我的佣金</a></li>#}
{#          <li> <a href="#">申请提现4</a></li>#}
{#        </ul>#}
{#      </dd>#}
{#    </dl>#}
    </div>
{#      <script>jQuery(".sideMen").slide({titCell:"dt", targetCell:"dd",trigger:"click",defaultIndex:0,effect:"slideDown",delayTime:300,returnDefault:true});</script>#}
   </div>
 </div>
 <!--右侧样式属性-->
 <div class="right_style">
 <!--地址管理-->
  <div class="user_address_style">
    <div class="title_style"><em></em>地址管理</div>
      <form method="post" class="sign_address" >
   <div class="add_address">
    <span class="name">添加送货地址</span>
    <table cellpadding="0" cellspacing="0" width="100%">
     <tr><td class="label_name">收&nbsp;货&nbsp;&nbsp;人：</td><td><input name="" type="text" id="username" class="add_text" style=" width:100px"/><i>*</i></td></tr>
     <tr><td class="label_name">所在地区：</td><td>
             <select size="1" id="province"  onchange="getCity(this)">
              <option value="" id="sheng">省</option>
            </select>
            <select size="1" name="" id="city" onchange="getArea(this)">
              <option value="" id="shi">市</option>
            </select>
            <select size="1" name="" id="area">
              <option value="" id="xian">县/区</option>
            </select><i>*</i></td></tr>
     <tr><td class="label_name">街道地址：</td><td><textarea name="" cols="" rows="" id="addres" style=" width:500px; height:100px; margin:5px 0px"></textarea><i>*</i></td></tr>
     <tr><td class="label_name">邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;编：</td><td><input name="" type="text" id="email" class="add_text" style=" width:100px"/><i>*</i></td></tr>
     <tr><td class="label_name">手&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机：</td><td><input name="" type="text" id="mobile" class="add_text" style=" width:200px"/>&nbsp;&nbsp;(选填)</td></tr>
     <tr><td class="label_name">固定电话：</td>
     <td><input name="" type="text" id="tel" class="add_text" style="width:100px" placeholder="电话号码"/></td></tr>
{#     <tr class="moren_dz" style="color: #999"><td class="label_name"></td><td><label><input name="" type="checkbox" value="" />设置为默认地址</label></td></tr>#}
     <tr><td colspan="2" class="center"><input name="" type="submit" value="保存"  class="add_dzbtn"/><input name="" type="reset" value="清空"  class="reset_btn"/></td></tr>
    </table>
   </div>
      </form>
   <!--用户地址-->
   <div class="address_content">
    <div class="address_prompt">以添加了{{ count1 }}条地址，最多保存添加15条地址</div>
    <table cellpadding="0" cellspacing="0" class="user_address" width="100%">
    <thead>
     <tr class="label"><td width="80px;">收货人</td><td width="180px;">所在地</td><td width="220px;">详细地址</td><td width="80px;">邮编</td><td width="120px;">电话手机</td><td width="180px;">发票抬头</td><td width="80px;">操作</td></tr>
     </thead>
     <tbody>
     {% for area in addr %}
      <tr><td>{{ area.receiver }}</td><td>{{ area.province }} {{ area.city }} {{ area.district }}</td><td>{{ area.place }}</td><td>{{ area.email }}</td><td>{{ area.mobile }}</td><td>个人</td><td><a href="address/{{ area.id }}">删除</a></td></tr>
     {% endfor %}
     </tbody>
    </table>
   </div>  
  </div>
 </div>
 </div>
 </div>
    <script>
            $(document).ready(function(){
              $('.moren_dz input').iCheck({
                checkboxClass: 'icheckbox_flat-green',
                radioClass: 'iradio_flat-green'
              });
            });
            </script>
 <!--网站地图-->
<div class="fri-link-bg clearfix">
    <div class="fri-link">
        <div class="logo left margin-r20"><img src="/static/images/fo-logo.jpg" width="152" height="81" /></div>
        <div class="left"><img src="/static/images/qd.jpg" width="90"  height="90" />
            <p>扫描下载APP</p>
        </div>
       <div class="">
    <dl>
	 <dt>新手上路</dt>
	 <dd><a href="#">售后流程</a></dd>
     <dd><a href="#">购物流程</a></dd>
     <dd><a href="#">订购方式</a> </dd>
     <dd><a href="#">隐私声明 </a></dd>
     <dd><a href="#">推荐分享说明 </a></dd>
	</dl>
	<dl>
	 <dt>配送与支付</dt>
	 <dd><a href="#">保险需求测试</a></dd>
     <dd><a href="#">专题及活动</a></dd>
     <dd><a href="#">挑选保险产品</a> </dd>
     <dd><a href="#">常见问题 </a></dd>
	</dl>
	<dl>
	 <dt>售后保障</dt>
	 <dd><a href="#">保险需求测试</a></dd>
     <dd><a href="#">专题及活动</a></dd>
     <dd><a href="#">挑选保险产品</a> </dd>
     <dd><a href="#">常见问题 </a></dd>
	</dl>
	<dl>
	 <dt>支付方式</dt>
	 <dd><a href="#">保险需求测试</a></dd>
     <dd><a href="#">专题及活动</a></dd>
     <dd><a href="#">挑选保险产品</a> </dd>
     <dd><a href="#">常见问题 </a></dd>
	</dl>	
    <dl>
	 <dt>帮助中心</dt>
	 <dd><a href="#">保险需求测试</a></dd>
     <dd><a href="#">专题及活动</a></dd>
     <dd><a href="#">挑选保险产品</a> </dd>
     <dd><a href="#">常见问题 </a></dd>
	</dl>
     <dl>
	 <dt>帮助中心</dt>
	 <dd><a href="#">保险需求测试</a></dd>
     <dd><a href="#">专题及活动</a></dd>
     <dd><a href="#">挑选保险产品</a> </dd>
     <dd><a href="#">常见问题 </a></dd>
	</dl>
	   
   </div>
    </div>
</div>
<!--网站地图END-->
<!--网站页脚-->
<div class="copyright">
    <div class="copyright-bg">
        <div class="hotline">为生活充电在线 <span>招商热线：****-********</span> 客服热线：400-******</div>
        <div class="hotline co-ph">
            <p>版权所有Copyright ©***************</p>
            <p>*ICP备***************号 不良信息举报</p>
            <p>总机电话：****-*********/194/195/196 客服电话：4000****** 传 真：********
                
                E-mail:****@****.gov.cn</p>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/static/js/infos.js" ></script>
        <script>
            var pro = document.getElementById("province");
            function getPro(){
                for(var i=0;i<infos.length;i++){
//                  console.log(infos[i].code+"--"+infos[i].name);
                    pro.innerHTML+="<option value='"+infos[i].code+"'>"+infos[i].name+"</option>";
                };
            };
            var cities = [];
            var city = document.getElementById("city");
            function getCity(t){
//              console.log(t.value);
                var proID = t.value;
                area.innerHTML="<option>请选择县区</option>";
                city.innerHTML="<option>请选择城市</option>";
                for(var i=0;i<infos.length;i++){
                    if(proID==infos[i].code){
                        cities = infos[i].city;
                        //遍历city
                        for(var j=0;j<cities.length;j++){
                            city.innerHTML+="<option value='"+cities[j].code+"'>"+cities[j].name+"</option>";
                        }
                        break;
                    }
                };
            }
            var area = document.getElementById("area");
            function getArea(t){
                var areaID = t.value;
                area.innerHTML="<option>请选择县区</option>";
                for(var j=0;j<cities.length;j++){
                    if (areaID==cities[j].code){
                        for (var k=0;k<cities[j].area.length;k++){
                            area.innerHTML+="<option value='"+cities[j].area[k].code+"'>"+cities[j].area[k].name+"</option>";
                        }
                        break;
                    }
                };
            }
            //页面加载完成
            window.onload=function(){
                getPro();
            };
        </script>
<script type="text/javascript" src="/static/js/user_address.js"></script>
</html>
